"""

"""
import copy


class ChangeObject:
    @staticmethod
    def PMLInteger_FromInt(obj: int):
        from pml import Objects
        return Objects.object.PMTypeObject(Objects.PMIntegerObject.PMIntegerObject(obj).getObject())

    @staticmethod
    def PMLFloat_FromFloat(obj: float):
        from pml import Objects
        return Objects.object.PMTypeObject(Objects.PMFloatObject.PMFloatObject(obj).getObject())

    @staticmethod
    def PMLString_FromStr(obj: str):
        from pml import Objects
        return Objects.object.PMTypeObject(Objects.PMStringObject.PMStringObject(obj).getObject())

    @staticmethod
    def PMLList_FromList(obj: list):
        from pml import Objects
        return Objects.object.PMTypeObject(Objects.PMListObject.PMListObject(obj).getObject())

    @staticmethod
    def PMLNull_FromNone(obj=None):
        from pml import Objects
        return Objects.object.PMTypeObject(Objects.PMNullObject.PMNullObject(obj).getObject())

    @staticmethod
    def PMLObject_FromPythonObject(obj):
        if obj is None:
            return ChangeObject.PMLNull_FromNone(obj)
        if isinstance(obj, int):
            return ChangeObject.PMLInteger_FromInt(obj)
        if isinstance(obj, float):
            return ChangeObject.PMLFloat_FromFloat(obj)
        if isinstance(obj, str):
            return ChangeObject.PMLString_FromStr(obj)
        if isinstance(obj, list):
            return ChangeObject.PMLList_FromList(obj)

def PML_RealizePMLObject(obj):
    from pml import Objects
    return Objects.object.PMTypeObject(copy.deepcopy(obj))

def PMLTypeEquality(obj, type):
    return isinstance(obj.obj, type)
